home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / internet-drafts / draft-houttuin-rfc1327-tutor-03.txt < prev    next >
Text File  |  1993-08-10  |  87KB  |  2,240 lines

  1. INTERNET DRAFT                                        Jeroen Houttuin
  2. RARE WG-MSG                                          RARE Secretariat
  3. Rev. 3.3                                                  25 May 1993
  4.                                     
  5.  
  6.         A tutorial on gatewaying between X.400 and Internet mail
  7.  
  8.  
  9. Abstract
  10.  
  11.     
  12.     There are many ways in which X.400 and Internet (RFC 822) mail
  13.     systems can be interconnected. Addresses and service elements can
  14.     be mapped onto each other in different ways. From the early
  15.     available gateway implementations, one was not necessarily better
  16.     than another, but the sole fact that each handled the mappings in a
  17.     different way led to major interworking problems, especially when a
  18.     message (or address) crossed more than one gateway. The need for
  19.     one global standard on how to implement X.400 - Internet mail
  20.     gatewaying was satisfied by the Internet Request For Comments 1327,
  21.     "Mapping between X.400(1988)/ISO 10021 and RFC 822."
  22.     
  23.     This tutorial was produced especially to help new gateway managers
  24.     find their way into the complicated subject of mail gatewaying
  25.     according to RFC 1327. The need for such a tutorial can be
  26.     illustrated by quoting the following discouraging paragraph from
  27.     RFC 1327, chapter 1: "Warning: the remainder of this specification
  28.     is technically detailed. It will not make sense, except in the
  29.     context of RFC 822 and X.400 (1988). Do not attempt to read this
  30.     document unless you are familiar with these specifications."
  31.     
  32.     The introduction of this tutorial is general enough to be read not
  33.     only by gateway managers, but also by e-mail managers who are new
  34.     to gatewaying or to one of the two e-mail worlds in general. Parts
  35.     of this introduction can be skipped as needed.
  36.     
  37.     For novice end-users, even this tutorial will be difficult to read.
  38.     They are encouraged to use the COSINE MHS pocket user guide [pug]
  39.     instead.
  40.     
  41.     To a certain extent, this document can also be used as a reference
  42.     guide to X.400 <-> RFC 822 gatewaying. Wherever there is a lack of
  43.     detail in the tutorial, it will at least point to the corresponding
  44.     chapters in other documents. As such, it shields the RFC 1327
  45.     novice from too much detail.
  46.  
  47.  
  48. Status of this Memo
  49.  
  50.     
  51.     The previous version of this document has been proposed by the
  52.     author to the IESG and the RTC to become both an Informational RFC
  53.  
  54.  
  55.  
  56. Houttuin               Expires February 1994                [page   1]
  57.  
  58. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  59.  
  60.  
  61.     and an RTR. For that purpose, this version (3.2) incorporates the
  62.     second round of solicited comments from the IESG and the RTC.
  63.     
  64.     This document is an Internet Draft. Internet Drafts are working
  65.     documents of the Internet Engineering Task Force (IETF), its Areas,
  66.     and its Working Groups. Note that other groups may also distribute
  67.     working documents as Internet Drafts.
  68.     
  69.     Internet Drafts are draft documents valid for a maximum of six
  70.     months. Internet Drafts may be updated, replaced, or obsoleted by
  71.     other documents at any time.  It is not appropriate to use Internet
  72.     Drafts as reference material or to cite them other than as a
  73.     "working draft" or "work in progress."
  74.     
  75.     Please check the I-D abstract listing contained in each Internet
  76.     Draft directory to learn the current status of this or any other
  77.     Internet Draft.
  78.     
  79.     Distribution of this memo is unlimited.
  80.  
  81.  
  82. Acknowledgements
  83.  
  84.     
  85.     This tutorial was originally produced by SWITCH within the context
  86.     of the COSINE MHS contract. It is heavily based on other papers and
  87.     books, such as [JH-92], [HTA-faq], [822], [1280], [1310], and
  88.     [1327], from which large parts of text were reproduced (slightly
  89.     edited) by kind permission from the authors.
  90.  
  91.  
  92. Disclaimer
  93.  
  94.     
  95.     This document is not everywhere exact and or complete in describing
  96.     the involved standards. Irrelevant details are left out and some
  97.     concepts are simplified for the ease of understanding. For
  98.     reference purposes, always use the original documents.
  99.  
  100.  
  101. Format
  102.  
  103.     
  104.     This document is available in ASCII as well as in Postscript
  105.     format. The index is only available in the Postscript version.
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115. Houttuin               Expires February 1994                [page   2]
  116.  
  117. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  118.  
  119.  
  120. Contents
  121.  
  122.     1. Introduction            
  123.       1.1. What is X.400 ?    
  124.       1.2. What is an RFC ?  
  125.       1.3. What is RFC 822 ?
  126.       1.4. What is RFC 1327 ?              
  127.       1.5. RFC 822 versus X.400           
  128.     2. Service Elements                  
  129.     3. Address mapping                  
  130.       3.1. X.400 addresses             
  131.         3.1.1. Standard Attributes    
  132.         3.1.2. Domain Defined Attributes
  133.         3.1.3. X.400 address notation  
  134.       3.2. RFC 822 addresses          
  135.       3.3. RFC 1327 address mapping  
  136.         3.3.1. Default mapping      
  137.           3.3.1.1. X.400 -> RFC 822
  138.           3.3.1.2. RFC 822 -> X.400
  139.         3.3.2. Exception mapping  
  140.           3.3.2.1. PersonalName  
  141.           3.3.2.2. Mapping between RFC 822 and X.400 domains
  142.             3.3.2.2.1. X.400 -> RFC 822                    
  143.             3.3.2.2.2. RFC 822 -> X.400                   
  144.       3.4. Table co-ordination                           
  145.       3.5. Local additions                              
  146.       3.6. Product specific formats                    
  147.       3.7. Guidelines for mapping rule definition     
  148.     4. Conclusion                                    
  149.     Appendix A. References                          
  150.     Appendix B. Abbreviations                     
  151.     Appendix C. Author's address                 
  152.  
  153.  
  154. 1. Introduction
  155.  
  156.     
  157.     This chapter describes the history, status, future, and contents of
  158.     the involved standards.
  159.     
  160.     There is a major difference between mail systems used in the USA
  161.     and Europe. Mail systems originated mainly in the USA, where their
  162.     explosive growth started as early as in the seventies. Different
  163.     company-specific mail systems were developed simultaneously, which,
  164.     of course, led to a high degree of incompatibility. The Defense
  165.     Advanced Research Projects Agency (DARPA), which had to use
  166.     machines of many different manufacturers, triggered the development
  167.     of the Internet and the TCP/IP protocol suite, which was later
  168.     accepted as a standard by the US Department of Defense (DoD). The
  169.     Internet mail format is defined in RFC 822 and the protocol used
  170.     for exchanging mail is known as the simple mail transfer protocol
  171.  
  172.  
  173.  
  174. Houttuin               Expires February 1994                [page   3]
  175.  
  176. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  177.  
  178.  
  179.     (SMTP). Together with UUCP and the BITNET protocol NJE, SMTP has
  180.     become one of the main de facto mail standards in the US.
  181.     
  182.     Unfortunately, all these protocols were incompatible, which
  183.     explains the need to come to an acceptable global mail standard.
  184.     CCITT and ISO began working on a norm and their work converged in
  185.     what is now known as the X.400 Series Recommendations. One of the
  186.     objectives was to define a superset of the existing systems,
  187.     allowing for easier integration later on. Some typical positive
  188.     features of X.400 are the store-and-forward mechanism, the
  189.     hierarchical address space and the possibility of combining
  190.     different types of body parts into one message body.
  191.     
  192.     In Europe, the mail system boom came later. Since there was not
  193.     much equipment in place yet, it made sense to use X.400 as much as
  194.     possible right from the beginning. A strong X.400 lobby existed,
  195.     especially in West-Germany (DFN). In the R&D world, mostly EAN was
  196.     used because it was the only affordable X.400 product at that time
  197.     (Source-code licenses were free for academic institutions).
  198.     
  199.     At the moment, the two worlds of X.400 and SMTP are moving closer
  200.     together. On the one hand, the American Department of Defense, one
  201.     of the main forces behind the Internet, has decided that future
  202.     networking should be based on ISO standards, implying a migration
  203.     from SMTP to X.400. On the other hand X.400 users in Europe have a
  204.     need to communicate with the Internet. Due to the large traffic
  205.     volume between the two nets it is not enough interconnecting them
  206.     with a single international gateway. The load on such a gateway
  207.     would be too heavy. Direct access using local gateways is more
  208.     feasible.
  209.     
  210.     Although the expected success of X.400 has been a bit disappointing
  211.     (mainly because no good products were available), the future of e-
  212.     mail systems must still be seen in the context of this standard.
  213.     
  214.     And although in the long run X.400 is believed to take over the
  215.     world of e-mail systems, SMTP cannot be neglected over the next ten
  216.     years. Especially the simple installation procedures and the high
  217.     degree of connectivity will contribute to a growing number of RFC
  218.     822 installations in Europe and world-wide in the near future.
  219.  
  220.  
  221. 1.1. What is X.400 ?
  222.  
  223.     
  224.     In October 1984, the Plenary Assembly of the CCITT accepted a
  225.     standard to facilitate international message exchange between
  226.     subscribers to computer based store-and-forward message services.
  227.     This standard is known as the CCITT X.400 series recommendations
  228.     ([CCITT 84], from now on called X.400(84)) and happens to be the
  229.     first CCITT recommendation for a network application;. It should be
  230.     noted that X.400(84) is based on work done in the IFIP Working
  231.  
  232.  
  233. Houttuin               Expires February 1994                [page   4]
  234.  
  235. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  236.  
  237.  
  238.     Group 6.5, and that ISO at the same time was proceeding towards a
  239.     compatible document. However, the standardisation efforts of CCITT
  240.     and ISO did not converge in time (not until the 1988 version), to
  241.     allow the publication of a common text.
  242.     
  243.     X.400(84) triggered the development of software implementing (parts
  244.     of) the standard in the laboratories of almost all major computer
  245.     vendors and many software houses. Similarly, public carriers in
  246.     many countries started to plan X.400(84) based message systems that
  247.     would be offered to the users as value added services. Early
  248.     implementations appeared shortly after first drafts of the standard
  249.     were published and a considerable number of commercial systems are
  250.     available nowadays.
  251.     
  252.     X.400(84) describes a functional model for a Message Handling
  253.     System (MHS) and associates services and protocols. The model
  254.     illustrated in Figure 2.1. defines the components of a distributed
  255.     messaging system:
  256.     
  257.     Users in the MHS environment are provided with the capability of
  258.     sending and receiving messages. Users in the context of an MHS may
  259.     be humans or application processes. The User Agent (UA) is a
  260.     process that makes the services of the MTS available to the user. A
  261.     UA may be implemented as a computer program that provides utilities
  262.     to create, send, receive and perhaps archive messages. Each UA, and
  263.     thus each user, is identified by a name (each user has its own UA).
  264.     
  265.     The Message Transfer system (MTS) transfers messages from an
  266.     originating UA to a recipient UA. As implied by the figure shown
  267.     above, data sent from UA to UA may be stored temporarily in several
  268.     intermediate Message Transfer Agents (MTA), i.e. a store-and-
  269.     forward mechanism is being used. An MTA forwards received messages
  270.     to a next MTA or to the recipient UA.
  271.     
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292. Houttuin               Expires February 1994                [page   5]
  293.  
  294. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  295.  
  296.  
  297.     -----------------------------------------------------------------
  298.     |                user        user   Message Handling Environment|
  299.     |                 |            |                                |
  300.     |     ----------------------------------------------------------|
  301.     |     |           |            |    Message Handling System    ||
  302.     |     |         ----          ----                             ||
  303.     |     |         |UA|          |UA|                             ||
  304.     |     |         ----          ----                             ||
  305.     |     |           |             |                              ||
  306.     |     |       -------------------------------------------------||
  307.     |     |       |   |             |   Message Transfer System   |||
  308.     |     | ----  |  -----         -----                          |||
  309.     |user-|-|UA|--|--|MTA|         |MTA|                          |||
  310.     |     | ----  |  -----         -----                          |||
  311.     |     |       |    \             /                            |||
  312.     |     |       |     \           /                             |||
  313.     |     |       |      \         /                              |||
  314.     |     |       |       \       /                               |||
  315.     |     |       |        \     /                                |||
  316.     |     | ----  |         -----                                 |||
  317.     |user-|-|UA|--|---------|MTA|                                 |||
  318.     |     | ----  |         -----                                 |||
  319.     |     |       -------------------------------------------------||
  320.     |     ----------------------------------------------------------|
  321.     -----------------------------------------------------------------
  322.                     Fig. 2.1. X.400 functional model
  323.     
  324.     X.400(84) divides layer 7 of the OSI Reference Model into 2
  325.     sublayers, the User Agent Layer (UAL) and the Message Transfer
  326.     Layer (MTL) as shown in the following figure:
  327.     
  328.     --------------------------------------------------------------
  329.                 -----                          -----
  330.     UA layer    |UAE|<----- P2, Pc ----------->|UAE|
  331.                 -----                          -----
  332.     --------------------------------------------------------------
  333.                 ------          ------         -----
  334.     MTA layer   |MTAE|<-- P1 -->|MTAE|<-- P3-->|SDE|
  335.                 ------          ------         -----
  336.     --------------------------------------------------------------
  337.           xxxE = xxx Entity ;   SDE = Submission & Delivery Entity
  338.     --------------------------------------------------------------
  339.                         Fig. 2.2. X.400 Protocols
  340.     
  341.     The MTL is involved in the transport of messages from UA to UA,
  342.     using one or several MTAs as intermediaries. By consequence,
  343.     routing issues are entirely dealt with in the MTL. The MTL in fact
  344.     corresponds to the postal service that forwards letters consisting
  345.     of an envelope and a content. Two protocols, P1 and P3, are used
  346.     between the MTL entities (MTA Entity (MTAE), and Submission and
  347.     Delivery Entity (SDE)) to reliably transport messages. The UAL
  348.     embodies  peer UA Entities (UAE), which interpret the content of a
  349.  
  350.  
  351. Houttuin               Expires February 1994                [page   6]
  352.  
  353. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  354.  
  355.  
  356.     message and offer specific services to the application process.
  357.     Depending on the application to be supported on top of the MTL, one
  358.     of several end-to-end protocols (Pc) is used between UAEs. For
  359.     electronic mail, X.400(84) defines the protocol P2 as part of the
  360.     InterPersonal Messaging Service (IPMS). Conceivably other UAL
  361.     protocols may be defined, e.g. a protocol to support the exchange
  362.     of electronic business documents.
  363.     
  364.     The structure of an InterPersonal Message (IPM) can be visualised
  365.     as in Figure 2.3. (Note that the envelope is not a part of the IPM;
  366.     it is generated by the MTL).
  367.     
  368.     An IPM heading contains information that is specific for an
  369.     interpersonal message like 'originator', 'subject', etc. Each
  370.     bodypart can contain one information type, text, voice or as a
  371.     special case, a forwarded message. A forwarded message consists of
  372.     the original message together with Previous Delivery Information
  373.     (PDI), which is drawn from the original delivery envelope.
  374.     
  375.                                                             Forwarded
  376.     Message                                                 IP-message
  377.     -                     ----------      --- ----------    -
  378.     |  message-           |envelope|     /    | PDI    |    |
  379.     |  content   IPM      ----------    /     ----------    |
  380.     |  -         -        ----------   /      ----------    |
  381.     |  |         |  IPM-  |heading |  /       |heading |    |
  382.     |  |         |  body  ---------- /        ----------    |
  383.     |  |         |  -     ----------/         ----------    |
  384.     |  |         |  |     |bodypart|          |bodypart|    |
  385.     |  |         |  |     ----------\         ----------    |
  386.     |  |         |  |     ---------- \        ----------    |
  387.     |  |         |  |     |bodypart|  \       |bodypart|    |
  388.     |  |         |  |     ----------   \      ----------    |
  389.     |  |         |  |          .        \                   |
  390.     |  |         |  |          .         \                  |
  391.     |  |         |  |     ----------      \   ----------    |
  392.     |  |         |  |     |bodypart|       \  |bodypart|    |
  393.     -  -         -  -     ----------        - ----------    -
  394.                                       (PDI = Previous Delivery Info.)
  395.                     Fig. 2.3. X.400 message structure
  396.     
  397.     Early experience with X.400(84) showed that the standard had
  398.     various shortcomings. Therefore CCITT, in parallel with ISO,
  399.     corrected and extended the specification during its 1984 to 1988
  400.     study period and produced a revised standard ([CCITT/ISO 88]),
  401.     which was accepted at the 1988 CCITT Plenary Meeting ([BP-88]).
  402.     Amongst others, X.400(88) differs from X.400(84) in that it defines
  403.     a Message Store (MS), which can be seen as a kind of database for
  404.     messages. An MS enables the end-user to run a UA locally, e.g. on a
  405.     PC, whilst the messages are stored in the MS, which is co-located
  406.     with the MTA. The MTA can thus always deliver incoming messages to
  407.     the MS instead of to the UA. The MS can even automatically file
  408.  
  409.  
  410. Houttuin               Expires February 1994                [page   7]
  411.  
  412. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  413.  
  414.  
  415.     incoming messages according to certain criteria. Other enhancements
  416.     in the 88 version concern security and distribution lists.
  417.  
  418.  
  419. 1.2. What is an RFC ?
  420.  
  421.     
  422.     The Internet, a loosely-organised international collaboration of
  423.     autonomous, interconnected networks, supports host-to-host
  424.     communication through voluntary adherence to open protocols and
  425.     procedures defined by Internet Standards. There are also many
  426.     isolated internets, i.e., sets of interconnected networks, that are
  427.     not connected to the Internet but use the Internet Standards. The
  428.     architecture and technical specifications of the Internet are the
  429.     result of numerous research and development activities conducted
  430.     over a period of two decades, performed by the network R&D
  431.     community, by service and equipment vendors, and by government
  432.     agencies around the world.
  433.     
  434.     In general, an Internet Standard is a specification that is stable
  435.     and well-understood, is technically competent, has multiple,
  436.     independent, and interoperable implementations with operational
  437.     experience, enjoys significant public support, and is recognisably
  438.     useful in some or all parts of the Internet.
  439.     
  440.     The principal set of Internet Standards is commonly known as the
  441.     "TCP/IP protocol suite". As the Internet evolves, new protocols and
  442.     services, in particular those for Open Systems Interconnection
  443.     (OSI), have been and will be deployed in traditional TCP/IP
  444.     environments, leading to an Internet that supports multiple
  445.     protocol suites.
  446.     
  447.     The following organizations are involved in setting Internet
  448.     standards.
  449.     
  450.     Internet standardization is an organized activity of the Internet
  451.     Society (ISOC). The ISOC is a professional society that is
  452.     concerned with the growth and evolution of the worldwide Internet,
  453.     with the way in which the Internet is and can be used, and with the
  454.     social, political, and technical issues that arise as a result.
  455.     
  456.     The Internet Engineering Task Force (IETF) is the primary body
  457.     developing new Internet Standard specifications. The IETF is
  458.     composed of many Working Groups, which are organized into areas,
  459.     each of which is coordinated by one or more Area Directors.
  460.     
  461.     The Internet Engineering Steering Group (IESG) is responsible for
  462.     technical management of IETF activities and the approval of
  463.     Internet standards specifications, using well-defined rules. The
  464.     IESG is composed of the IETF Area Directors, some at-large members,
  465.     and the chairperson of the IESG/IETF.
  466.     
  467.  
  468.  
  469. Houttuin               Expires February 1994                [page   8]
  470.  
  471. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  472.  
  473.  
  474.     The Internet Architecture Board (IAB) has been chartered by the
  475.     Internet Society Board of Trustees to provide quality control and
  476.     process appeals for the standards process, as well as external
  477.     technical liaison, organizational oversight, and long-term
  478.     architectural planning and research.
  479.     
  480.     Any individual or group (e.g. an IETF or RARE working group) can
  481.     submit a document as a so-called Internet Draft. After the document
  482.     is proven stable, the IESG may turn the Internet-Draft into a
  483.     'Requests For Comments' (RFC). RFCs cover a wide range of topics,
  484.     from early discussion of new research concepts to status memos
  485.     about the Internet. All Internet Standards (STDs) are published as
  486.     RFCs, but not all RFCs specify standards. Another sub-series of the
  487.     RFCs are the RARE Technical Reports (RTRs).
  488.     
  489.     As an example, this tutorial also started out as an Internet Draft.
  490.     After almost one year of discussions and revisions it was approved
  491.     by the IESG as an Informational RFC.
  492.     
  493.     Once a document is assigned an RFC number and published, that RFC
  494.     is never revised or re-issued with the same number. Instead, a
  495.     revision will lead to the document being re-issued with a higher
  496.     number indicating that an older one is obsoleted.
  497.  
  498.  
  499. 1.3. What is RFC 822 ?
  500.  
  501.     
  502.     RFC 822 defines a standard for the format of Internet text
  503.     messages. Messages consist of lines of text. No special provisions
  504.     are made for encoding drawings, facsimile, speech, or structured
  505.     text. No significant consideration has been given to questions of
  506.     data compression or to transmission and storage efficiency, and the
  507.     standard tends to be free with the number of bits consumed. For
  508.     example, field names are specified as free text, rather than
  509.     special terse codes.
  510.     
  511.     A general "memo" framework is used. That is, a message consists of
  512.     some information in a rigid format (the 'headers'), followed by the
  513.     main part of the message (the 'body'), with a format that is not
  514.     specified in RFC 822. It does define the syntax of several fields
  515.     of the headers section; some of these fields must be included in
  516.     all messages.
  517.     
  518.     RFC 822 is used in conjunction with a number of different message
  519.     transfer protocol environments (822-MTSs).
  520.         
  521.         - SMTP Networks: On the Internet and other TCP/IP networks, RFC
  522.           822 is used in conjunction with two other standards: RFC 821,
  523.           also known as Simple Mail Transfer Protocol (SMTP) [821], and
  524.           RFC 920 which is a Specification for domains and a
  525.           distributed name service [920].
  526.  
  527.  
  528. Houttuin               Expires February 1994                [page   9]
  529.  
  530. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  531.  
  532.  
  533.         
  534.         - UUCP Networks: UUCP is the UNIX to UNIX CoPy protocol, which
  535.           is usually used over dialup telephone networks to provide a
  536.           simple message transfer mechanism.
  537.         
  538.         - BITNET: Some parts of Bitnet and related networks use RFC 822
  539.           related protocols, with EBCDIC encoding.
  540.         
  541.         - JNT Mail Networks: A number of X.25 networks, particularly
  542.           those associated with the UK Academic Community, use the JNT
  543.           (Joint Network Team) Mail Protocol, also known as Greybook.
  544.     
  545.     RFC 822 is based on the assumption that there is an underlying
  546.     service, which in RFC 1327 is called the 822-MTS service. The 822-
  547.     MTS service provides three basic functions:
  548.         
  549.         1. Identification of a list of recipients.
  550.         2. Identification of an error return address.
  551.         3. Transfer of an RFC 822 message.
  552.     
  553.     It is possible to achieve 2) within the RFC 822 header.  Some 822-
  554.     MTS protocols, in particular SMTP, can provide additional
  555.     functionality, but as these are neither mandatory in SMTP, nor
  556.     available in other 822-MTS protocols, they are not considered here.
  557.     Details of aspects specific to two 822-MTS protocols are given in
  558.     Appendices B and C of RFC 1327. An RFC 822 message consists of a
  559.     header, and content which is uninterpreted ASCII text. The header
  560.     is divided into fields, which are the protocol elements. Most of
  561.     these fields are analogous to P2 heading fields, although some are
  562.     analogous to MTS Service Elements.
  563.  
  564.  
  565. 1.4. What is RFC 1327 ?
  566.  
  567.     
  568.     There is a large community using RFC 822 based protocols for mail
  569.     services, who will wish to communicate with users of the
  570.     InterPersonal Messaging Service (IPMS) provided by X.400 systems,
  571.     and the other way around. This will also be a requirement in cases
  572.     where RFC 822 communities intend to make a transition to use X.400,
  573.     as conversion will be needed to ensure a smooth service transition.
  574.     
  575.     The basic function of a mail gateway can be described as follows:
  576.     receive a mail from one mail world, translate it into the formats
  577.     of the other mail world and send it out again using the routing
  578.     rules and protocols of that other world.
  579.     
  580.     Especially if a message crosses more than one gateway, it is
  581.     important that all gateways have the same understanding of how
  582.     things should be mapped. A simple example of what could go wrong
  583.     otherwise is the following: A sends a message to B through a
  584.     gateway and B's reply to A is being routed through another gateway.
  585.  
  586.  
  587. Houttuin               Expires February 1994                [page  10]
  588.  
  589. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  590.  
  591.  
  592.     If the two gateways don't use the same mappings, it can be expected
  593.     that the From and To addresses in the original mail and in the
  594.     answer don't match, which is, to say the least, very confusing for
  595.     the end-users (consider what happens if automated processes
  596.     communicate via mail). More serious things can happen to addresses
  597.     if a message crosses more than one gateway on its way from the
  598.     originator to the recipient. As a real-life example, consider
  599.     receiving a message from:
  600.     
  601.     Mary Plork <MMP_+a_ARG_+lMary_Plork+r%MHS+d_A0CD8A2B01F54FDC-
  602.     A0CB9A2B03F53FDC%ARG_Incorporated@argmail.com>
  603.     
  604.     This is not what you would call user-friendly addressing.... RFC
  605.     1327 describes a set of mappings that will enable a more
  606.     transparent interworking between systems operating X.400(both 84
  607.     and 88) and systems using RFC 822, or protocols derived from RFC
  608.     822.
  609.     
  610.     RFC 1327 describes all mappings in term of X.400(88). It defines
  611.     how these mappings should be applied to X.400(84) systems in its
  612.     Appendix G.
  613.     
  614.     Some words about the history of RFC 1327: It started out in June
  615.     1986, when RFC 987 defined for X.400(84) what RFC 1327 defines for
  616.     X.400(84 and 88). RFC 1026 specified a number of additions and
  617.     corrections to RFC 987. In December 1989, RFC 1138, which had a
  618.     very short lifetime, was the first one to deal with X.400(88). It
  619.     was obsoleted by RFC 1148 in March 1990. Finally, in May 1992, RFC
  620.     1327 obsoleted all of its ancestors.
  621.  
  622.  
  623. 1.5. RFC 822 versus X.400
  624.  
  625.     
  626.     Before describing RFC 1327 in more detail, it is useful to quickly
  627.     compare RFC 822 with X.400:
  628.     
  629.     RFC 822 has:
  630.         
  631.         - Simplicity
  632.         - Wide acceptance
  633.         - Large user base
  634.         - Public domain and commercial implementations
  635.         - Public domain and commercial user interfaces
  636.         - History
  637.     
  638.     X.400 has:
  639.         
  640.         - Acceptance in the standards communities
  641.         - Commercial vendors of service
  642.         - Defined ways to transfer things other than ASCII text (but
  643.           only a few implementations include these capabilities)
  644.  
  645.  
  646. Houttuin               Expires February 1994                [page  11]
  647.  
  648. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  649.  
  650.  
  651.         - Standard notifications of delivery to a user's mailbox and
  652.           notification of a message being read by the user (these
  653.           capabilities are often implemented, too!)
  654.         - Future
  655.  
  656.  
  657. 2. Service Elements
  658.  
  659.     
  660.     Both RFC 822 and X.400 messages consist of certain service elements
  661.     (such as 'originator' and 'subject'). As long as a message stays
  662.     within its own world, the behaviour of such service elements is
  663.     well defined. An important goal for a gateway is to maintain the
  664.     highest possible service level when a message crosses the boundary
  665.     between the two mail worlds.
  666.     
  667.     When a user originates a message, a number of services are
  668.     available. RFC 1327 describes, for each service elements, to what
  669.     extent it is supported for a recipient accessed through a gateway.
  670.     There are three levels of support:
  671.         
  672.         - Supported: Some of the mappings are quite straight-forward,
  673.           such as '822.Subject:' <-> 'IPMS.Subject'.
  674.         
  675.         - Not supported: There may be a complete mismatch: certain
  676.           service elements exist only in one of the two worlds (e.g.
  677.           interpersonal notifications).
  678.         
  679.         - Partially supported: When similar service elements exist in
  680.           both worlds, but with slightly different interpretations,
  681.           some tricks may be needed to provide the service over the
  682.           gateway border.
  683.     
  684.     Apart from mapping between the service elements, a gateway must
  685.     also map the types and values assigned to these service elements.
  686.     Again, this may in certain cases be very simple, e.g. 'IA5 ->
  687.     ASCII'. The most complicated example is mapping address spaces. The
  688.     problem is that address spaces are not something static that can be
  689.     defined within RFC 1327. Address spaces change continuously, and
  690.     they are defined by certain addressing authorities, which are not
  691.     always parallel in the RFC 822 and the X.400 world. A valid mapping
  692.     between two addresses assumes however that there is 'administrative
  693.     equivalence' between the two domains in which the addresses exist
  694.     (see also [Mapau-93]).
  695.     
  696.     The following basic mappings are defined in RFC 1327. When going
  697.     from RFC 822 to X.400, an RFC 822 message and the associated 822-
  698.     MTS information is always mapped into an IPM (MTA, MTS, and IPMS
  699.     Services). Going from X.400 to RFC 822, an RFC 822 message and the
  700.     associated 822-MTS information may be derived from:
  701.         
  702.  
  703.  
  704.  
  705. Houttuin               Expires February 1994                [page  12]
  706.  
  707. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  708.  
  709.  
  710.         - A Report (MTA, and MTS Services)
  711.         
  712.         - An InterPersonal Notification (IPN) (MTA, MTS, and IPMS
  713.           services)
  714.         
  715.         - An InterPersonal Message (IPM) (MTA, MTS, and IPMS services)
  716.     
  717.     Probes (MTA Service) have no equivalent in RFC 821 or RFC 822 and
  718.     are thus handled by the gateway. The gateway's Probe confirmation
  719.     should be interpreted as if the gateway were the final MTA to which
  720.     the Probe was sent. Optionally, if the gateway uses RFC 821 as an
  721.     822-MTS, it may use the results of the 'VRFY' command to test
  722.     whether it would be able to deliver (or forward) mail to the
  723.     mailbox under probe.
  724.     
  725.     MTS Messages containing Content Types other than those defined by
  726.     the IPMS are not mapped by the gateway, and should be rejected at
  727.     the gateway.
  728.     
  729.     Some basic examples of mappings between service elements are listed
  730.     below.
  731.     
  732.     Service elements:
  733.          
  734.          RFC 822         X.400
  735.          ------------------------------------------------
  736.          Reply-To:       IPMS.Heading.reply-recipients
  737.          Subject:        IPMS.Heading.subject
  738.          In-Reply-To:    IPMS.Heading.replied-to-ipm
  739.          References:     IPMS.Heading.related-IPMs
  740.          To:             IPMS.Heading.primary-recipients
  741.          Cc:             IPMS.Heading.copy-recipients
  742.     
  743.     Service element types:
  744.          
  745.          RFC 822         X.400
  746.          ------------------------------------------------
  747.          ASCII           PrintableString
  748.          Boolean         Boolean
  749.     
  750.     Service element values:
  751.          
  752.          RFC 822         X.400
  753.          ------------------------------------------------
  754.          oh_dear         oh(u)dear
  755.          False           00000000
  756.     
  757.     There are some mappings between service elements that are rather
  758.     tricky and important enough to mention in this tutorial. These are
  759.     the mappings of origination-related headers and some envelope
  760.     fields:
  761.     
  762.  
  763.  
  764. Houttuin               Expires February 1994                [page  13]
  765.  
  766. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  767.  
  768.  
  769.     RFC 822 -> X.400:
  770.         
  771.         - If Sender: is present, Sender: is mapped to
  772.           IPMS.Heading.originator, and From: is mapped to
  773.           IPMS.Heading.authorizing-users. If not, From: is mapped to
  774.           IPMS.Heading.originator.
  775.     
  776.     X.400 -> RFC 822
  777.         
  778.         - If IPMS.Heading.authorizing-users is present,
  779.           IPMS.Heading.originator is mapped to Sender:, and
  780.           IPMS.Heading.authorizing-users is mapped to From: . If not,
  781.           IPMS.Heading.originator is mapped to From:.
  782.     
  783.     Envelope attributes
  784.         
  785.         - RFC 1327 doesn't define how to map the MTS.OriginatorName and
  786.           the MTS.RecipientName (often referred to as the P1.originator
  787.           and P1.recipient), since this depends on which underlying 822-
  788.           MTS is used. In the very common case that RFC 821 (SMTP) is
  789.           used for this purpose, the mapping is normally as follows:
  790.             
  791.             MTS.Originator-name <->   MAIL FROM:
  792.             MTS.Recipient-name  <->   RCPT TO:
  793.         
  794.           This explains why there are no mapped equivalents for those
  795.           envelope attributes visible in the heading of an RFC 822
  796.           message.
  797.     
  798.     For more details, refer to RFC 1327, chapters 2.2 and 2.3.
  799.  
  800.  
  801. 3. Address mapping
  802.  
  803.     
  804.     As address mapping is often considered the most complicated part of
  805.     mapping between service element values, this subject is given a
  806.     separate chapter in this tutorial.
  807.     
  808.     Both RFC 822 and X.400 have their own specific address formats. RFC
  809.     822 addresses are text strings (e.g. "plork@tlec.nl"), whereas
  810.     X.400 addresses are binary (ASN.1) encoded sets of attributes with
  811.     values. Such binary addresses can be made readable for a human user
  812.     by a number of notations; for instance:
  813.         
  814.         C=zz
  815.         ADMD=ade
  816.         PRMD=fhbo
  817.         O=a bank
  818.         S=plork
  819.         G=mary
  820.     
  821.  
  822.  
  823. Houttuin               Expires February 1994                [page  14]
  824.  
  825. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  826.  
  827.  
  828.     The rest of this chapter deals with addressing issues and mappings
  829.     between the two address forms in more detail.
  830.  
  831.  
  832. 3.1. X.400 addresses
  833.  
  834.     
  835.     As already stated above, an X.400 address is modelled as a set of
  836.     attributes. Some of these attributes are mandatory, others are
  837.     optional. Each attribute has a type and a value, e.g. the Surname
  838.     attribute has type IA5text, and an instance of this attribute could
  839.     have the value 'Kille'. Attributes are divided into Standard
  840.     Attributes (SAs) and Domain Defined Attributes (DDAs).
  841.     
  842.     X.400 defines four basic forms of addresses ([X.402(88), 18.5), of
  843.     which the 'Mnemonic O/R Address' is the form that is most used, and
  844.     is the only form that is dealt with in this tutorial. This is
  845.     roughly the same address format as what in the 84 version was known
  846.     as 'O/R names: form 1, variant 1' ([X.400(84)] 3.3.2).
  847.  
  848.  
  849. 3.1.1. Standard Attributes
  850.  
  851.     
  852.     Standard Attributes (SAs) are attributes that all X.400
  853.     installations are supposed to 'understand' (i.e. use for routing),
  854.     for example: 'country name', 'given name' or 'organizational unit'.
  855.     The most commonly used SAs in X.400(84) are:
  856.         
  857.         surName (S)
  858.         givenName (G)
  859.         initials (I*) (Zero or more)
  860.         generationQualifier (GQ)
  861.         OrganizationalUnits (OU1 OU2 OU3 OU4)
  862.         OrganizationName (O)
  863.         PrivateDomainName (PRMD)
  864.         AdministrationDomainName (ADMD)
  865.         CountryName (C)
  866.     
  867.     The combination of S, G, I* and GQ is often referred to as the
  868.     PersonalName (PN).
  869.     
  870.     Although there is no hierarchy (of addressing authorities) defined
  871.     by the standards, the following hierarchy is considered natural:
  872.         
  873.         PersonalName < OU4 < OU3 < OU2 < OU1 < O < P < A < C
  874.     
  875.     In addition to the SAs listed above, X.400(88) defines some extra
  876.     attributes, the most important of which is
  877.         
  878.         Common Name (CN)
  879.     
  880.  
  881.  
  882. Houttuin               Expires February 1994                [page  15]
  883.  
  884. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  885.  
  886.  
  887.     CN can be used instead of or even together with PN. The problem in
  888.     X.400(84) was that PN (S G I* GQ) was well suited to represent
  889.     persons, but not roles and abstract objects, such as distribution
  890.     lists. Even though postmaster clearly is a role, not someone's real
  891.     surname, it is quite usual in X.400(84) to address a postmaster
  892.     with S=postmaster. In X.400(88), the same postmaster would be
  893.     addressed with CN=postmaster .
  894.     
  895.     The attributes C and ADMD are mandatory (i.e. they must be
  896.     present), and may not be empty. At least one of the attributes
  897.     PRMD, O, OU, PN and CN must be present.
  898.     
  899.     PRMD and ADMD are often felt to be routing attributes that don't
  900.     really belong in addresses. As an example of how such address
  901.     attributes can be used for the purpose of routing, consider two
  902.     special values for ADMD:
  903.         
  904.         - ADMD=0; (zero) should be interpreted as 'the PRMD in this
  905.           address is not connected to any ADMD'
  906.         
  907.         - ADMD= ; (single SPACE) should be interpreted as 'the PRMD in
  908.           this address is reachable via any ADMD in this country'. It
  909.           is expected that ISO will express this 'any' value by means
  910.           of a missing ADMD attribute in future versions of MOTIS. This
  911.           representation can uniquely identify the meaning 'any', as a
  912.           missing or empty ADMD field as such is not allowed.
  913.     
  914.     Addresses are defined in X.400 using the Abstract Syntax Notation
  915.     One (ASN.1). X.409 defines how definitions in ASN.1 should be
  916.     encoded into binary format. Note that the meaning, and thus the
  917.     ASN.1 encoding, of a missing attribute is not the same as that of
  918.     an empty attribute. In addressing, this difference is often
  919.     represented as follows:
  920.         
  921.         - PRMD=; means that this attribute is present in the address,
  922.           but its value is empty. Since this is not very useful, it's
  923.           hardly ever being used. The only examples the author knows of
  924.           were caused by mail managers who should have had this
  925.           tutorial before they started defining their addresses :-)
  926.         
  927.         - PRMD=@; means that this attribute is not present in the
  928.           address.
  929.           {NB. This is only necessary if an address notation (see
  930.           below) requires that every single attribute in the hierarchy
  931.           is somehow listed. Otherwise, a missing attribute can of
  932.           course be represented by simply not mentioning it. This means
  933.           that this syntax is mostly used in mapping rules, not by end
  934.           users.}
  935.     
  936.     Addresses that only contain SAs are often referred to as Standard
  937.     Attribute Addresses (SAAs).
  938.  
  939.  
  940.  
  941. Houttuin               Expires February 1994                [page  16]
  942.  
  943. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  944.  
  945.  
  946.  
  947. 3.1.2. Domain Defined Attributes
  948.  
  949.     
  950.     Domain Defined Attributes (DDAs) cane be used in addition to
  951.     Standard Attibutes. An instance of a DDA consists of a type and a
  952.     value. DDAs are meant to have a meaning only within a certain
  953.     context (originally this was supposed to be the context of a
  954.     certain management domain, hence the name DDA), such as a company
  955.     context.
  956.     
  957.     As an example, a company might want to define a DDA for describing
  958.     internal telephone numbers: DDA type=phone value=9571.
  959.     
  960.     A bit tricky is the use of DDAs to encode service element types or
  961.     values that are only available on one side of a service gateway.
  962.     The most important examples of such usage are defined in:
  963.        
  964.        RFC 1327 (e.g. DDA type=RFC-822 value=u(u)ser(a)isode.com)
  965.        
  966.        RFC 1328 ;(e.g. DDA type=CommonName value=mhs-discussion-list)
  967.     
  968.     Addresses that contain both SAs and DDAs are often referred to as
  969.     DDA addresses.
  970.  
  971.  
  972. 3.1.3. X.400 address notation
  973.  
  974.     
  975.     X.400 only prescribes the binary encoding of addresses, it doesn't
  976.     standardise how such addresses should be written on paper or what
  977.     they should look like in a user interface on a computer screen.
  978.     There exist a number of recommendations for X.400 address
  979.     representation though.
  980.   
  981.   - JTC proposed an annex to CCITT Rec. F.401 and ISO/IEC 10021-2,
  982.     called 'Representation of O/R addresses for human usage'. According
  983.     to this proposal, an X.400 address would look as follows:
  984.   
  985.     G=jo; S=plork; O=a bank; OU1=owe; OU2=you; P=fhbo; A=ade; C=zz
  986.     
  987.     Note that in this format, the order of O and the OUs is exactly the
  988.     opposite of what one would expect intuitively (the attribute
  989.     hierarchy is increasing from left to right, except for the O and
  990.     OUs, where it's right to left. The reasoning behind this is that
  991.     this sequence is following the example of a postal address). This
  992.     proposal has been added (as a recommendation) to the 1992 version
  993.     of the standards.
  994.   
  995.   - Following what was originally used in the DFN-EAN software, most
  996.     EAN versions today use an address representation similar to the JTC
  997.     proposal, with a few differences:
  998.  
  999.  
  1000. Houttuin               Expires February 1994                [page  18]
  1001.  
  1002. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  1003.  
  1004.  
  1005.             
  1006.             - natural ordering for O and OUs
  1007.             - no numbering of OUs.
  1008.             - allows writing ADMD and PRMD instead of A and P
  1009.   
  1010.     The address in the example above could, in EAN, be represented as:
  1011.   
  1012.     G=jo; S=plork; OU=you; OU=owe; O=a bank; P=fhbo; A=ade; C=zz
  1013.   
  1014.     This DFN-EAN format is still often referred to as _the_ 'readable
  1015.     format'.
  1016.   
  1017.   - The RARE Working Group on Mail and Messaging, WG-MSG, has made a
  1018.     recommendation that is very similar to the DFN-EAN format, but with
  1019.     the hierarchy reversed. Further, ADMD and PRMD are used instead of
  1020.     A and P. This results in the address above being represented as:
  1021.   
  1022.     C=zz; ADMD=ade; PRMD=fhbo; O=a bank; OU=owe; OU=you; S=plork; G=jo
  1023.     
  1024.     This format is recognised by most versions of the EAN software. In
  1025.     the R&D community, this is one of the most popular address
  1026.     representations for business cards, letter heads, etc. It is also
  1027.     the format that will be used for the examples in this tutorial.
  1028.     (NB. The syntax used here for describing DDAs is as follows:
  1029.     DD.'type'='value', e.g. DD.phone=9571)
  1030.   
  1031.   - RFC 1327 defines a slash separated address representation:
  1032.   
  1033.     /G=jo/S=plork/OU=you/OU=owe/O=a bank/P=fhbo/A=ade/C=zz/
  1034.     
  1035.     Not only is this format used by the PP software, it is also
  1036.     widespread for business cards and letter heads in the R&D
  1037.     community.
  1038.   
  1039.   - RFC 1327 finally defines yet another format for X.400 _domains_
  1040.     (not for human users):
  1041.   
  1042.     OU$you.OU$owe.O$a bank.P$fhbo.A$ade.C$zz
  1043.     
  1044.     The main advantage of this format is that it is better machine-
  1045.     parseble than the others, which also immediately implies its main
  1046.     disadvantage: it is barely readable for humans. Every attribute
  1047.     within the hierarchy should be listed, thus a missing attribute
  1048.     must be represented by the '@' sign
  1049.     (e.g. $a bank.P$@.A$ade.C$zz).
  1050.   
  1051.   - Paul-Andr Pays (INRIA) has proposed a format that combines the
  1052.     readability of the JTC format with the parsebility of the RFC 1327
  1053.     domain format. Although a number of operational tools within the GO-
  1054.     MHS community are already based on (variants of) this proposal, its
  1055.     future is still uncertain.
  1056.  
  1057.  
  1058.  
  1059. Houttuin               Expires February 1994                [page  19]
  1060.  
  1061. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  1062.  
  1063.  
  1064.  
  1065. 3.2. RFC 822 addresses
  1066.  
  1067.     
  1068.     An RFC 822 address takes the form of an ASCII string of the
  1069.     following form:
  1070.         
  1071.         localpart@domainpart
  1072.     
  1073.     "domainpart" is sub-divided into
  1074.     
  1075.     domainpart = sdom(n).sdom(n-1)....sdom(2).sdom(1).dom
  1076.     
  1077.     "sdom" stands for "subdomain", "dom" stands for "top-level-domain".
  1078.     
  1079.     "localpart" ;is normally a login name, and thus typically is a
  1080.     surname or an abbreviation for this. It can also designate a local
  1081.     distribution list.
  1082.     
  1083.     The hierarchy (of addressing authorities) in an RFC 822 address is
  1084.     as follows:
  1085.         
  1086.         localpart < sdom(n) < sdom(n-1) <...< dom
  1087.     
  1088.     Some virtual real-life examples:
  1089.         
  1090.         joemp@tlec.nl
  1091.         tsjaka.kahn@walhalla.diku.dk
  1092.         a13_vk@cs.rochester.edu
  1093.     
  1094.     In the above examples, 'nl', 'dk', and 'edu' are valid,
  1095.     registered, top level domains. Note that some networks that have
  1096.     their own addressing schemes are also reachable by way of 'RFC
  1097.     822-like' addressing. Consider the following addresses:
  1098.         
  1099.         oops!user          (a UUCP address)
  1100.         V13ENZACC@CZKETH5A (a BITNET address)
  1101.     
  1102.     These addresses can be expressed in RFC 822 format:
  1103.         
  1104.         user@oops.uucp
  1105.         V13ENZACC@CZKETH5A.BITNET
  1106.     
  1107.     Although the domains '.uucp' and '.bitnet' are not officially
  1108.     registered, they are used in the Internet to express that the mail
  1109.     should be routed to a gateway.
  1110.     
  1111.     As for mapping such addresses to X.400, there is no direct mapping
  1112.     defined between X.400 on the one hand and UUCP and BITNET on the
  1113.     other, so they are normally mapped to RFC 822 style first, and then
  1114.     to X.400 if needed.
  1115.  
  1116.  
  1117.  
  1118. Houttuin               Expires February 1994                [page  20]
  1119.  
  1120. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  1121.  
  1122.  
  1123.  
  1124. 3.3. RFC 1327 address mapping
  1125.  
  1126.     
  1127.     Despite the difference in address formats, the address spaces
  1128.     defined by RFC 822 and X.400 are quite similar. The most important
  1129.     parallels are:
  1130.         
  1131.         - both address spaces are hierarchical
  1132.         - top level domains and country codes are often the same
  1133.         - localparts and surnames are often the same
  1134.     
  1135.     This similarity can of course be exploited in address mapping
  1136.     algorithms. This is also done in RFC 1327 (NB only in the exception
  1137.     mapping algorithm. See chapter 3.3.2).
  1138.     
  1139.     Note that the actual mapping algorithm is much more complicated
  1140.     than shown below. For details, see RFC 1327, chapter 4.
  1141.  
  1142.  
  1143. 3.3.1. Default mapping
  1144.  
  1145.     
  1146.     The default RFC 1327 address mapping can be visualised as a
  1147.     function with input and output parameters:
  1148.         
  1149.         
  1150.           address information of the gateway performing the mapping
  1151.                                       |
  1152.                                       v
  1153.                              +-----------------+
  1154.         RFC 822 address <--->| address mapping | <---> X.400 address
  1155.                              +-----------------+
  1156.     
  1157.     I.e. to map an address from X.400 to RFC 822 or vice versa, the
  1158.     only extra input needed is the address information of the local
  1159.     gateway.
  1160.  
  1161.  
  1162. 3.3.1.1. X.400 -> RFC 822
  1163.  
  1164.     
  1165.     There are two kinds of default address mapping from X.400 to RFC
  1166.     822: one to map a real X.400 address to RFC 822, and another to
  1167.     decode an RFC 822 address that was mapped to X.400 (i.e. to reverse
  1168.     the default RFC 822 -> X.400 mapping).
  1169.     
  1170.     To map a real X.400 address to RFC 822, the slash separated
  1171.     notation of the X.400 address (see chapter 3.1.) is mapped to
  1172.     'localpart', and the local RFC 822 domain of the gateway that
  1173.     performs the mapping is used as the domain part. As an example, the
  1174.     gateway 'gw.switch.ch' would perform the following mappings:
  1175.  
  1176.  
  1177. Houttuin               Expires February 1994                [page  21]
  1178.  
  1179. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  1180.  
  1181.  
  1182.         
  1183.         C=zz; ADMD=ade; PRMD=fhbo; O=tlec; S=plork; ->
  1184.         /C=zz/ADMD=ade/PRMD=fhbo/O=tlec/S=plork/@gw.switch.ch
  1185.         
  1186.         C=zz; ADMD=ade; PRMD=fhbo; O=a bank; S=plork->
  1187.         "/C=zz/ADMD=ade/PRMD=fhbo/O=a bank/S=plork/"@gw.switch.ch
  1188.     
  1189.     The quotes in the second example are mandatory if the X.400 address
  1190.     contains spaces, otherwise the syntax rules for the RFC 822
  1191.     localpart would be violated.
  1192.     
  1193.     This default mapping algorithm is generally referred to as 'left-
  1194.     hand-side encoding'.
  1195.     
  1196.     To reverse the default RFC 822 -> X.400 mapping (see chapter
  1197.     3.3.1.2): if the X.400 address contains a DDA of the type RFC-822,
  1198.     the SAs can be discarded, and the value of this DDA is the desired
  1199.     RFC 822 address (NB. Some characters in the DDA value must be
  1200.     decoded first. See chapter 3.3.1.2.). For example, the gateway
  1201.     'GW.tlec.nl' would perform the following mapping:
  1202.         
  1203.         DD.RFC-822=bush(a)dole.us; C=nl; ADMD=tlec; PRMD=GW
  1204.         ->
  1205.         bush@dole.us
  1206.  
  1207.  
  1208. 3.3.1.2. RFC 822 -> X.400
  1209.  
  1210.     
  1211.     There are also two kinds of default address mapping from RFC 822 to
  1212.     X.400: one to map a real RFC 822 address to X.400, and another to
  1213.     decode an X.400 address that was mapped to RFC 822 (i.e. to reverse
  1214.     the default X.400 -> RFC 822 mapping).
  1215.     
  1216.     To map a real RFC 822 address to X.400, the RFC 822 address is
  1217.     encoded in a DDA of type RFC-822 , and the SAs of the local gateway
  1218.     performing the mapping are added to form the complete X.400
  1219.     address. This mapping is generally referred to as 'DDA mapping'. As
  1220.     an example, the gateway 'C=nl; ADMD=tlec; PRMD=GW' would perform
  1221.     the following mapping:
  1222.         
  1223.         bush@dole.us  ->
  1224.         DD.RFC-822=bush(a)dole.us; C=nl; ADMD=tlec; PRMD=GW
  1225.     
  1226.     As for the encoding/decoding of RFC 822 addresses in DDAs, it is
  1227.     noted that RFC 822 addresses may contain characters (@ ! % etc.)
  1228.     that cannot directly be represented in a DDA. DDAs are of the
  1229.     restricted character set type 'PrintableString', which is a subset
  1230.     of IA5 (=ASCII). Characters not in this set need a special
  1231.     encoding. Some examples (For details, refer to RFC 1327, chapter
  1232.     3.4.):
  1233.         
  1234.  
  1235.  
  1236. Houttuin               Expires February 1994                [page  22]
  1237.  
  1238. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  1239.  
  1240.  
  1241.         100%name@address   -> DD  .RFC-822;=100(p)name(a)address
  1242.         u_ser!name@address -> DD.RFC-822;=u(u)ser(b)name(a)address
  1243.     
  1244.     To decode an X.400 address that was mapped to RFC 822: if the RFC
  1245.     822 address has a slash separated representation of a complete
  1246.     X.400 mnemonic O/R address in its localpart, that address is the
  1247.     result of the mapping. As an example, the gateway 'gw.switch.ch'
  1248.     would perform the following mapping:
  1249.         
  1250.         /C=zz/ADMD=ade/PRMD=fhbo/O=tlec/S=plork/G=mary/@gw.switch.ch
  1251.         ->
  1252.         C=zz; ADMD=ade; PRMD=fhbo; O=tlec; S=plork; G=mary
  1253.  
  1254.  
  1255. 3.3.2. Exception mapping according to mapping tables
  1256.  
  1257.     
  1258.     Chapter 3.3.1. showed that it is theoretically possible to use RFC
  1259.     1327 with default mapping only. Although this provides a very
  1260.     simple, straightforward way to map addresses, there are some very
  1261.     good reasons not to use RFC 1327 this way:
  1262.         
  1263.         - RFC 822 users are used to writing simple addresses of  the
  1264.           form 'localpart@domainpart'. They often consider X.400
  1265.           addresses, and thus also the left-hand-side encoded
  1266.           equivalents, as unnecessarily long and complicated. They
  1267.           would rather be able to address an X.400 user as if she had a
  1268.           'normal' RFC 822 address. For example, take the mapping
  1269.             
  1270.             C=zz; ADMD=ade; PRMD=fhbo; O=tlec; S=plork;     ->
  1271.             /C=zz/ADMD=ade/PRMD=fhbo/O=tlec/S=plork/@gw.switch.ch
  1272.         
  1273.           from chapter 3.3.1.1. RFC 822 users would find it much more
  1274.           'natural' if this address could be expressed in RFC 822 as:
  1275.             
  1276.             plork@tlec.fhbo.ade.nl
  1277.         
  1278.         - X.400 users are used to using X.400 addresses with SAs only.
  1279.           They often consider DDA addresses as complicated, especially
  1280.           if they have to encode the special characters, @ % ! etc,
  1281.           manually. They would rather be able to address an RFC 822
  1282.           user as if he had a 'normal' X.400 address. For example, take
  1283.           the mapping
  1284.             
  1285.             bush@dole.us
  1286.             ->
  1287.             DD.RFC-822=bush(a)dole.us;
  1288.             C=nl; ADMD= ; PRMD=tlec; O=gateway
  1289.         
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295. Houttuin               Expires February 1994                [page  23]
  1296.  
  1297. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  1298.  
  1299.  
  1300.           from chapter 3.3.1.2. X.400 users would find it much more
  1301.           'natural' if this address could be expressed in X.400 as:
  1302.             
  1303.             C=us; ADMD=dole; S=bush
  1304.         
  1305.         - Many organisations are using both RFC 822 and X.400
  1306.           internally, and still want all their users to have a simple,
  1307.           unique address in both mail worlds. Note that in the default
  1308.           mapping, the mapped form of an address completely depends on
  1309.           which gateway  performed the mapping. This also results in a
  1310.           complication of a more technical nature:
  1311.         
  1312.         - The tricky 'third party problem'. This problem need not
  1313.           necessarily be understood to read the rest of this chapter.
  1314.           If it looks too complicated, please feel free to skip it
  1315.           until you are more familiar with the basics.
  1316.         
  1317.           The third party problem is a routing problem caused by
  1318.           mapping. As an example for DDA mappings (the example holds
  1319.           just as well for left-hand-side encoding), consider the
  1320.           following situation (see Fig. 3.1.): RFC 822 user X in
  1321.           country A sends a message to two recipients: RFC 822 user Y,
  1322.           and X.400 user Z, both in country B:
  1323.             
  1324.             From: X@A
  1325.             To:   Y@B ,
  1326.                   /C=B/.../S=Z/@GW.A
  1327.         
  1328.           Since the gateway in country A maps all addresses in the
  1329.           message, Z will see both X's and Y's address as DDA-encoded
  1330.           RFC 822 addresses, with the SAs of the gateway in country A:
  1331.             
  1332.             From: DD.RFC-822=X(a)A; C=A;....;O=GW
  1333.             To:   DD.RFC-822=Y(a)B; C=A;....;O=GW ,
  1334.                   C=B;...;S=Z
  1335.             
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354. Houttuin               Expires February 1994                [page  24]
  1355.  
  1356. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  1357.  
  1358.  
  1359.             |       ------------         ---------
  1360.             |       |X: RFC 822|<------->|gateway|
  1361.             |       ------------         ---------
  1362.             | A           |                  ^
  1363.             \             |                  |
  1364.              \---------------------------------------------
  1365.                           |                  |
  1366.              /---------------------------------------------
  1367.             /             |                  |
  1368.             | B           |                  v
  1369.             |             |              -----------
  1370.             |             |              |Z: X.400 |
  1371.             |             |              -----------
  1372.             |             |                  .
  1373.             |             |                  .
  1374.             |             |                  .
  1375.             |             |                  .
  1376.             |             |                  .
  1377.             |             v                  v
  1378.             |        ------------         ---------
  1379.             |        |Y: RFC 822|<........|gateway|
  1380.             |        ------------         ---------
  1381.                                     
  1382.                     Fig. 3.1 The third party problem
  1383.                                     
  1384.         
  1385.           Now if Z wants to 'group reply' to both X and Y, his reply to
  1386.           Y will be routed over the gateway in country A, even though Y
  1387.           is located in the same country:
  1388.             
  1389.             From: C=B;...;S=Z
  1390.             To:   DD.RFC-822=Y(a)B; C=A;....;O=GW ,
  1391.                   DD.RFC-822=X(a)A; C=A;....;O=GW
  1392.         
  1393.           The best way to travel for a message from Z to Y would of
  1394.           course have been over the gateway in country B:
  1395.             
  1396.             From: C=B;...;S=Z
  1397.             To:   DD.RFC-822=Y(a)B; C=B;....;O=GW ,
  1398.                   DD.RFC-822=X(a)A; C=A;....;O=GW
  1399.         
  1400.           The third party problem is caused by the fact that local
  1401.           gateway address information is mapped into addresses.
  1402.         
  1403.           Ideally, the third party problem shouldn't exist. After all,
  1404.           address mapping affects addresses, and an address is not a
  1405.           route.... The reality is different however. For instance,
  1406.           very few X.400 products are capable to route messages on the
  1407.           contents of a DDA (actually, only RFC 1327 gateways will be
  1408.           able to interpret this type of DDA, and who says that the
  1409.           reply will pass a local gateway on its route back?). The same
  1410.           limitations hold for RFC 822 based mailers: most are not
  1411.  
  1412.  
  1413. Houttuin               Expires February 1994                [page  25]
  1414.  
  1415. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  1416.  
  1417.  
  1418.           capable to make routing decisions on the content of a left-
  1419.           hand-side encoded X.400 address. So in practice, addressing
  1420.           (and thus also mapping) will very well affect routing.
  1421.     
  1422.     To make mapping between addresses more user friendly, and to avoid
  1423.     the problems shown above, RFC 1327 allows for overruling the
  1424.     default left-hand-side encoding and DDA mapping algorithms. This is
  1425.     done by specifying associations (mapping rules) between certain
  1426.     domainparts and X.400 domains. An X.400 domain (for our purposes;
  1427.     CCITT has a narrower definition...) consists of the domain-related
  1428.     SAs of a Mnemonic O/R address (i.e. all SAs except PN and CN). The
  1429.     idea is to use the similarities between both address spaces, and
  1430.     directly map similar address parts onto each other. If, for the
  1431.     domain in the address to be mapped, an explicit mapping rule can be
  1432.     found, the mapping is performed between:
  1433.         
  1434.         localpart     <->   PersonalName
  1435.         domainpart    <->   X.400 domain
  1436.     
  1437.     The address information of the gateway is only used as an input
  1438.     parameter if no mapping rule can be found, i.e. if the address
  1439.     mapping must fall back to its default algorithm.
  1440.     
  1441.     The complete mapping function can thus be visualised as follows:
  1442.         
  1443.         
  1444.           address information of the gateway performing the mapping
  1445.                                       |
  1446.                                       v
  1447.                              +-----------------+
  1448.         RFC 822 address <--->| address mapping | <---> X.400 address
  1449.                              +-----------------+
  1450.                                       ^
  1451.                                       |
  1452.                     domain associations (mapping rules)
  1453.  
  1454.  
  1455. 3.3.2.1. PersonalName and localpart mapping
  1456.  
  1457.     
  1458.     Since the mapping between these address parts is independent of the
  1459.     mapping rules that are used, and because it follows a simple, two-
  1460.     way algorithmic approach, this subject is discussed in a separate
  1461.     sub-chapter first.
  1462.     
  1463.     The X.400 PersonalName consists of givenName, initials, and
  1464.     surName. RFC 1327 assumes that generationQualifier is not used.
  1465.     
  1466.     To map a localpart to an X.400 PN, the localpart is scanned for
  1467.     dots, which are considered delimiters between the components of PN,
  1468.     and also between single initials. In order not to put too much
  1469.  
  1470.  
  1471.  
  1472. Houttuin               Expires February 1994                [page  26]
  1473.  
  1474. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  1475.  
  1476.  
  1477.     detail in this tutorial, only a few examples are shown here. For
  1478.     the detailed algorithm, see RFC 1327, chapter 4.2.1.
  1479.         
  1480.         Marshall.Rose             <->   G=Marshall;S=Rose
  1481.         M.T.Rose                  <->   I=MT;S=Rose
  1482.         Marshall.M.T.Rose         <->   G=Marshall;I=MT;S=Rose
  1483.     
  1484.     To map an X.400 PN to an RFC 822 localpart, take the non-empty PN
  1485.     attributes, put them into their hierarchical order (G I* S), and
  1486.     connect them with periods.
  1487.     
  1488.     Some exceptions are caused by the fact that left-hand-side encoding
  1489.     can also be mixed with exception mapping. This is shown in more
  1490.     detail in the following sub-chapters.
  1491.  
  1492.  
  1493. 3.3.2.2. Mapping between RFC 822 and X.400 domains
  1494.  
  1495.     
  1496.     A mapping rule associates two domains: an X.400 domain and an RFC
  1497.     822 domain. The X.400 domain is written in the RFC 1327 domain
  1498.     notation (See 3.1.3.), so that both domains have the same
  1499.     hierarchical order. The domains are written on one line, separated
  1500.     by a '#' sign. For instance:
  1501.         
  1502.         arcom.ch#ADMD$arcom.C$ch#
  1503.         PRMD$tlec.ADMD$ade.C$nl#tlec.nl#
  1504.     
  1505.     A mapping rule must at least contain a top level domain and a
  1506.     country code. If an address must be mapped, a mapping rule with the
  1507.     longest domain match is sought. The associated domain in the
  1508.     mapping rule is used as the domain of the mapped address. The
  1509.     remaining domains are mapped one by one following the natural
  1510.     hierarchy. Concrete examples are shown in the following sub-
  1511.     chapters.
  1512.  
  1513.  
  1514. 3.3.2.2.1. X.400 -> RFC 822
  1515.  
  1516.     As an example, consider the mapping rule:
  1517.         
  1518.         PRMD$tlec.ADMD$ade.C$nl#tlec.nl#
  1519.     
  1520.     Then the address C=nl; ADMD=ade; PRMD=tlec; O=you; OU=owe; S=plork
  1521.         
  1522.         S      OU  O  PRMD  ADMD  Country
  1523.         |      |   |  |     |     |
  1524.         plork owe you tlec  ade   nl
  1525.     
  1526.     would be mapped as follows. The Surname 'plork' is mapped to the
  1527.     localpart 'plork', see chapter 3.3.2.1. The domain
  1528.     'PRMD$tlec.ADMD$ade.C$nl' is mapped according to the mapping rule:
  1529.  
  1530.  
  1531. Houttuin               Expires February 1994                [page  27]
  1532.  
  1533. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  1534.  
  1535.  
  1536.         
  1537.         localpart
  1538.            |  sdom3
  1539.            |    | sdom2
  1540.            |    |   |  sdom1
  1541.            |    |   |   |  top-level-domain
  1542.            |    |   |   |   |
  1543.         plork@         tlec.nl
  1544.     
  1545.     The remaining SAs (O and one OU) are mapped one by one following
  1546.     the natural hierarchy: O is mapped to sdom2, OU is mapped to sdom3:
  1547.         
  1548.         localpart
  1549.            | sdom3
  1550.            |  | sdom2
  1551.            |  |   |  sdom1
  1552.            |  |   |   |  top-level-domain
  1553.            |  |   |   |    |
  1554.         plork@owe.you.tlec.nl
  1555.     
  1556.     Thus the mapped address is:
  1557.         
  1558.         plork@owe.you.tlec.nl
  1559.     
  1560.     The table containing the listing of all such mapping rules, which
  1561.     is distributed to all gateways world-wide, is normally refered to
  1562.     as 'mapping table 1'. Other commonly used filenames (also depending
  1563.     on which software your are using) are:
  1564.         
  1565.         'or2rfc'
  1566.         'mapping 1'
  1567.         'map1'
  1568.         'table 1'
  1569.         'X2R'
  1570.     
  1571.     As already announced, there is an exceptional case were localpart
  1572.     and PN are not directly mapped onto each other: sometimes it is
  1573.     necessary to use the localpart for other purposes. If the X.400
  1574.     address contains attributes that would not allow for the simple
  1575.     mapping:
  1576.         
  1577.         localpart     <->   PersonalName
  1578.         domainpart    <->   X.400 domain
  1579.     
  1580.     (e.g. spaces are not allowed in an RFC 822 domain, GQ and CN cannot
  1581.     be directly mapped into localpart, DDAs of another type than RFC-
  1582.     822), such attributes, together with the PN, are left-hand-side
  1583.     encoded. The domainpart must still be mapped according to the
  1584.     mapping rule as far as possible. This probably needs some examples:
  1585.         
  1586.  
  1587.  
  1588.  
  1589.  
  1590. Houttuin               Expires February 1994                [page  28]
  1591.  
  1592. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  1593.  
  1594.  
  1595.         C=nl; ADMD=ade; PRMD=tlec; O=owe; OU=you; S=plork; GQ=jr
  1596.         ->
  1597.         /S=plork/GQ=jr/@you.owe.tlec.nl
  1598.         
  1599.         C=nl; ADMD=ade; PRMD=tlec; O=owe; OU=spc ctr; OU=u; S=plork
  1600.         ->
  1601.         "/S=plork/OU=u/OU=spc ctr/"@owe.tlec.nl
  1602.     
  1603.     Note that in the second example, 'O=owe' is still mapped to a
  1604.     subdomain following the natural hierarchy. The problems start with
  1605.     the space in 'OU=spc ctr'.
  1606.  
  1607.  
  1608. 3.3.2.2.2. RFC 822 -> X.400
  1609.  
  1610.     As an example, consider the mapping rule:
  1611.         
  1612.         tlec.nl#PRMD$tlec.ADMD$ade.C$nl#
  1613.     
  1614.     Then the address 'plork@owe.you.tlec.nl' :
  1615.         
  1616.         localpart
  1617.            |  sdom3
  1618.            |    | sdom2
  1619.            |    |   |  sdom1
  1620.            |    |   |   |  top-level-domain
  1621.            |    |   |   |   |
  1622.         plork@owe.you.tlec.nl
  1623.     
  1624.     would be mapped as follows.
  1625.     
  1626.     The localpart 'plork' is mapped to 'S=plork', see chapter 3.3.2.1.
  1627.     
  1628.     The domain 'tlec.nl' is mapped according to the mapping rule:
  1629.         
  1630.         S     OU  OU  O  PRMD  ADMD  Country
  1631.         |                |     |    |
  1632.         plork            tlec  ade  nl
  1633.     
  1634.     The remaining domains (owe.you) are mapped one by one following the
  1635.     natural hierarchy: sdom2 is mapped to O, sdom3 is mapped to OU:
  1636.         
  1637.         S     OU  OU  O  PRMD  ADMD  Country
  1638.         |         |   |  |     |     |
  1639.         plork     |   |  tlec  ade   nl
  1640.                   owe you
  1641.     
  1642.     Thus the mapped address is (in a readable notation):
  1643.         
  1644.         C=nl; ADMD=ade; PRMD=tlec; O=you; OU=owe; S=plork
  1645.     
  1646.  
  1647.  
  1648.  
  1649. Houttuin               Expires February 1994                [page  29]
  1650.  
  1651. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  1652.  
  1653.  
  1654.     Had there been any left-hand-side encoded SAs in the localpart that
  1655.     didn't represent a complete mnemonic O/R address, the localpart
  1656.     would be mapped to those SAs. E.g.
  1657.         
  1658.         "/S=plork/GQ=jr/OU=u/OU=spc ctr/"@owe.tlec.nl
  1659.         ->
  1660.         C=nl; ADMD=ade; PRMD=tlec; O=owe; OU=space ctr;
  1661.         OU=u; S=plork; GQ=jr
  1662.     
  1663.     This is necessary to reverse the special use of localpart to left-
  1664.     hand-side encode certain attributes. See 3.3.2.2.1.
  1665.     
  1666.     You might ask yourself by now why such rules are needed at all. Why
  1667.     don't we just use map1 in the other direction? The problem is that
  1668.     a symmetric mapping function (a bijection) would indeed be ideal,
  1669.     but it's not feasible. Asymmetric mappings exist for a number of
  1670.     reasons:
  1671.         
  1672.         - To make sure that uucp addresses etc. get routed over local
  1673.           gateways.
  1674.         
  1675.         - Preferring certain address forms, while still not forbidding
  1676.           others to use another form. Examples of such reasons are:
  1677.             
  1678.             - Phasing out old address forms.
  1679.             
  1680.             - If an RFC 822 address is mapped to ADMD= ; it means that
  1681.               the X.400 mail can be routed over any ADMD in that
  1682.               country. One single ADMD may of course send out an
  1683.               address containing: ADMD=ade; . It must also be possible
  1684.               to map such an address back.
  1685.     
  1686.     So we do need mapping rules from RFC 822 to X.400 too. The table
  1687.     containing the listing of all such mapping rules, which is
  1688.     distributed to all gateways world-wide, is normally refered to as
  1689.     'mapping table 2' . Other commonly used filenames (also depending
  1690.     on which software your are using) are:
  1691.         
  1692.         'rfc2or'
  1693.         'mapping 2'
  1694.         'map2'
  1695.         'table 2'
  1696.         'R2X'
  1697.     
  1698.     If the RFC 822 localpart and/or domainpart contain characters that
  1699.     would not immediately fit in the value of a PN attribute (! % _),
  1700.     the mapping algorithm falls back to DDA mapping. In this case, the
  1701.     SAs that will be used are still determined by mapping the
  1702.     domainpart according to the mapping rule. In our case:
  1703.         
  1704.  
  1705.  
  1706.  
  1707.  
  1708. Houttuin               Expires February 1994                [page  30]
  1709.  
  1710. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  1711.  
  1712.  
  1713.         100%user@work.tlec.nl
  1714.         ->
  1715.         DD.RFC-822=100(p)user(a)work.tlec.nl;
  1716.         C=nl; ADMD=ade; PRMD=tlec; O=work
  1717.     
  1718.     If no map2 rule can be found, a third table of rules is scanned:
  1719.     the gateway table. This table has the same syntax as mapping table
  1720.     2, but its semantics are different. First of all, a domain that
  1721.     only has an entry in the gateway table is always mapped into an RFC
  1722.     822 DDA. For a domain that is purely RFC 822 based, but whose mail
  1723.     may be relayed over an X.400 network, the gateway table associates
  1724.     with such a domain the SAs of the gateway to which the X.400
  1725.     message should be routed. That gateway will then be responsible for
  1726.     gatewaying the message back into the RFC 822 world. E.g. if we have
  1727.     the gateway table entry:
  1728.         
  1729.         gov#PRMD$gateway.ADMD$Internet.C$us#
  1730.     
  1731.     (and we assume that no overruling map2 rule for the top level
  1732.     domain 'gov' exists), this would force all gateways to perform the
  1733.     following mapping:
  1734.         
  1735.         bush@dole.gov
  1736.         ->
  1737.         DD.RFC-822=bush(a)dole.gov;
  1738.         C=us; ADMD=Internet; PRMD=gateway
  1739.     
  1740.     This is very similar to the default DDA mapping, except the SAs are
  1741.     those of a gateway that has declared to be responsible for a
  1742.     certain RFC 822 domain, not those of the local gateway. And thus,
  1743.     this mechanism helps avoid the third party problem discussed in
  1744.     chapter 3.2.2.
  1745.     
  1746.     The table containing the listing of all such gateway rules, which
  1747.     is distributed to all gateways world-wide, is normally refered to
  1748.     as the 'gateway table'. Other commonly used filenames (also
  1749.     depending on which software your are using) are:
  1750.         
  1751.         'rfc1148gate' {From the predecessor of RFC 1327, RFC 1148}
  1752.         'gate table'
  1753.         'GW'
  1754.  
  1755.  
  1756. 3.4. Table co-ordination
  1757.  
  1758.     
  1759.     As already stated, the use of mapping tables will only function
  1760.     smoothly if all gateways in the world use the same tables. On the
  1761.     global level, the collection and distribution of RFC 1327 address
  1762.     mapping tables is co-ordinated by the MHS Co-ordination Service:
  1763.        
  1764.  
  1765.  
  1766.  
  1767. Houttuin               Expires February 1994                [page  31]
  1768.  
  1769. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  1770.  
  1771.  
  1772.        SWITCH Head Office
  1773.        MHS Co-ordination Service
  1774.        Limmatquai 138
  1775.        CH-8001 Zurich, Europe
  1776.        Tel. +41 1 268 1550
  1777.        Fax. +41 1 268 1568
  1778.        
  1779.        RFC 822: project-team@switch.ch
  1780.        X.400:   C=ch;ADMD=arcom;PRMD=switch;O=switch;S=project-team;
  1781.     
  1782.     The procedures for collection and distribution of mapping rules can
  1783.     be found on the MHS Co-ordination server, nic.switch.ch: in the
  1784.     directory /procedures . The server is available per FTP:
  1785.         
  1786.         username: cosine
  1787.         password: <your RFC 822 address>
  1788.     
  1789.     If you want to define mapping rules for your own local domain, you
  1790.     can find the right contact person in your country or network (the
  1791.     gateway manager) on the same server, in the directory /mhs-services
  1792.     .
  1793.  
  1794.  
  1795. 3.5. Local additions
  1796.  
  1797.     
  1798.     Since certain networks want to define rules that should only be
  1799.     used within their networks, such rules should not be distributed
  1800.     world-wide. Consider two networks that both want to reach the top-
  1801.     level-domain 'arpa' over their local gateway. They would both like
  1802.     to use a mapping 2 rule for this purpose:
  1803.         
  1804.         TLec in NL:     arpa#PRMD$gateway.ADMD$tlec.C$nl#
  1805.         
  1806.         SWITCH in CH:   arpa#PRMD$gateway.ADMD$switch.C$ch#
  1807.     
  1808.     (You may have noticed correctly that they should have defined such
  1809.     rules in the gateway table, but for the sake of the example, we
  1810.     assume they defined it in mapping table 2. This was the way things
  1811.     were done in the days of RFC 987, and many networks are still doing
  1812.     it this way these days.)
  1813.     
  1814.     Since a mapping table cannot contain two mapping rules with the
  1815.     same domain on the left hand side, such 'local mappings' are not
  1816.     distributed globally. There exists a RARE draft proposal ([Mapau-
  1817.     93]) which defines a mechanism for allowing and automatically
  1818.     dealing with conflicting mapping rules, but this mechanism has not
  1819.     been implemented as to date. After having received the global
  1820.     mapping tables from the MHS Co-ordination Service, many networks
  1821.     add 'local' rules to map2 and the gateway table before installing
  1822.     them on their gateways. Note that the reverse mapping 2 rules for
  1823.     such local mappings _are_ globally unique, and can thus be
  1824.  
  1825.  
  1826. Houttuin               Expires February 1994                [page  32]
  1827.  
  1828. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  1829.  
  1830.  
  1831.     distributed world-wide. This is even necessary, because addresses
  1832.     that were mapped with a local mapping rule may leak out to other
  1833.     networks (here comes the third party problem again...). Such other
  1834.     networks should at least be given the possibility to map the
  1835.     addresses back. So the global mapping table 1 would in this case
  1836.     contain the two rules:
  1837.         
  1838.         PRMD$gateway.ADMD$tlec.C$nl#arpa#
  1839.         PRMD$gateway.ADMD$switch.C$ch#arpa#
  1840.     
  1841.     Note that if such rules would have been defined as local gate table
  1842.     entries instead of map2 entries, there would have been no need to
  1843.     distribute the reverse mappings world-wide (the reverse mapping of
  1844.     a DDA encoded RFC 822 address is simply done by stripping the SAs,
  1845.     see 3.3.1.1.).
  1846.  
  1847.  
  1848. 3.6. Product specific formats
  1849.  
  1850.     
  1851.     Not all software uses the RFC 1327 format of the mapping tables
  1852.     internally. Almost all formats allow comments on a line starting
  1853.     with a # sign. Some examples of different formats:
  1854.     
  1855.     RFC 1327
  1856.         
  1857.         # This is pure RFC 1327 format
  1858.         # table 1: X.400 -> RFC 822
  1859.         #
  1860.         PRMD$tlec.ADMD$ade.C$nl#tlec.nl#
  1861.         # etc.
  1862.         
  1863.         # table 2: RFC 822 -> X.400
  1864.         #
  1865.         arcom.ch#ADMD$arcom.C$ch#
  1866.         # etc.
  1867.     
  1868.     EAN
  1869.         
  1870.         # This is EAN format
  1871.         # It uses the readable format for X.400 domains and TABs
  1872.         # to make a 'readable mapping table format'.
  1873.         # table 1: X.400 -> RFC 822
  1874.         #
  1875.         P=tlec; A=ade; C=nl;       # tlec.nl
  1876.         # etc.
  1877.         
  1878.         # table 2: RFC 822 -> X.400
  1879.         #
  1880.         arcom.ch                   # A=arcom; C=ch;
  1881.         # etc.
  1882.     
  1883.  
  1884.  
  1885. Houttuin               Expires February 1994                [page  33]
  1886.  
  1887. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  1888.  
  1889.  
  1890.     PP
  1891.         
  1892.         # This is PP format
  1893.         # table 1: X.400 -> RFC 822
  1894.         #
  1895.         PRMD$tlec.ADMD$ade.C$nl:tlec.nl
  1896.         # etc.
  1897.         
  1898.         # table 2: RFC 822 -> X.400
  1899.         #
  1900.         arcom.ch:ADMD$arcom.C$ch
  1901.         # etc.
  1902.     
  1903.     Most R&D networks have tools to automatically generate these
  1904.     formats from the original RFC 1327 tables;, some even distribute
  1905.     the tables within their networks in several formats. If you need
  1906.     mapping tables in a specific format, please contact your national
  1907.     or R&D network's gateway manager. See chapter 3.4 .
  1908.  
  1909.  
  1910. 3.7. Guidelines for mapping rule definition
  1911.  
  1912.     
  1913.     Beware that defining mapping rules without knowing what you are
  1914.     doing can be disastrous not only for your network, but also for
  1915.     others. You should be rather safe if you follow at least these
  1916.     rules:
  1917.         
  1918.         - First of all, read this tutorial;.
  1919.         
  1920.         - Avoid local mappings; prefer gate table entries. (See chapter
  1921.           3.5)
  1922.         
  1923.         - Make sure any domain you map to can also be mapped back;.
  1924.         
  1925.         - Aim for symmetry.
  1926.         
  1927.         - Don't define a gateway table entry if the same domain already
  1928.           has a map2 entry. Such a rule would be redundant.
  1929.         
  1930.         - Map to "ADMD=0;" if you will not be connected to any ADMD for
  1931.           the time being.
  1932.         
  1933.         - Only map to "ADMD= ;" if you are indeed reachable through
  1934.           _any_ ADMD in your country.
  1935.         
  1936.         - Mind the difference between "PRMD=;" and "PRMD=@;" and make
  1937.           sure which one you need. (Try to avoid empty or unused
  1938.           attributes in the O/R address hierarchy from the beginning!)
  1939.         
  1940.         - Don't define mappings for domains over which you have no
  1941.           naming authority.
  1942.  
  1943.  
  1944. Houttuin               Expires February 1994                [page  34]
  1945.  
  1946. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  1947.  
  1948.  
  1949.         
  1950.         - Before defining a mapping rule, make sure you have the
  1951.           permission from the naming authority of the domain you want
  1952.           to map to. Normally, this should be the same organisation as
  1953.           the mapping authority of the domain in the left hand side of
  1954.           the mapping rule. This principle is called 'administrative
  1955.           equivalence'.
  1956.         
  1957.         - Avoid redundant mappings. E.g. if all domains under 'tlec.nl'
  1958.           are in your control, don't define:
  1959.             
  1960.             first.tlec.nl#O$first.PRMD$tlec.ADMD$ade.C$nl#
  1961.             last.tlec.nl#O$last.PRMD$tlec.ADMD$ade.C$nl#
  1962.             always.tlec.nl#O$always.PRMD$tlec.ADMD$ade.C$nl#
  1963.         
  1964.           but rather have only one mapping rule:
  1965.             
  1966.             tlec.nl#PRMD$tlec.ADMD$ade.C$nl#
  1967.         
  1968.         - Before introducing a new mapped version of a domain, make
  1969.           sure the world can route to that mapped domain;.
  1970.         
  1971.           E.g. If you are operating a PRMD: C=zz; ADMD=ade; PRMD=ergo;
  1972.           and you want to define the mapping rules:
  1973.             
  1974.             map1: PRMD$ergo.ADMD$ade.C$zz#ergo.zz#
  1975.             map2: ergo.zz#PRMD$ergo.ADMD$ade.C$zz#
  1976.         
  1977.           Make sure that ergo.zz (or at least all of its subdomains) is
  1978.           DNS routeable (register an MX or A record) and will be routed
  1979.           to a gateway that agreed to route the messages from the
  1980.           Internet to you over X.400.
  1981.         
  1982.           In the other direction, if you are operating the Internet
  1983.           domain cs.woodstock.edu, and you want to define a mapping for
  1984.           that domain:
  1985.             
  1986.             map2: cs.woodstock.edu#O$cs.PRMD$woodstock.ADMD$ .C$us#
  1987.             map1: O$cs.PRMD$woodstock.ADMD$ .C$us#cs.woodstock.edu#
  1988.         
  1989.           Make sure that C=us; ADMD= ; PRMD=woodstock; O=cs; (or at
  1990.           least all of its subdomains) is routeable in the X.400 world,
  1991.           and will be routed to a gateway that agreed to route the
  1992.           messages from X.400 to your RFC 822 domain over SMTP. Within
  1993.           the GO-MHS community, this would be done by registering a
  1994.           line in a so-called domain document, which will state to
  1995.           which mail relay this domain should be routed.
  1996.         
  1997.           Co-ordinate any such actions with your national or MHS'
  1998.           gateway manager. See chapter 3.4.
  1999.  
  2000.  
  2001.  
  2002.  
  2003. Houttuin               Expires February 1994                [page  35]
  2004.  
  2005. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  2006.  
  2007.  
  2008. 4. Conclusion
  2009.  
  2010.     
  2011.     Mail gatewaying remains a complicated subject. If after reading
  2012.     this tutorial, you feel you understand the basics, try solving some
  2013.     real-life problems. This is indeed a very rewarding area to work
  2014.     in: even after having worked with it for many years, you can make
  2015.     amazing discoveries every other week........
  2016.     
  2017.     
  2018.  
  2019. Appendix A. References
  2020.  
  2021.       
  2022.       [821]       RFC 821; Jonathan B. Postel; SIMPLE MAIL TRANSFER
  2023.                   PROTOCOL; University of Southern California; August
  2024.                   1982
  2025.       
  2026.       [822]       RFC 822; Crocker, D.; Standard for the Format of ARPA
  2027.                   Internet Text Messages; University of Delaware,
  2028.                   August 1982
  2029.       
  2030.       [920]       RFC 920; J. Postel, J. Reynolds; Domain Requirements;
  2031.                   October 1984
  2032.       
  2033.       [987]       RFC 987; Steve Kille; Mapping between X.400 and RFC
  2034.                   822; UK Academic Community Report (MG.19), June 1986
  2035.       
  2036.       [1280]      RFC 1280; Jon Postel; IAB OFFICIAL PROTOCOL
  2037.                   STANDARDS; USC/Information Sciences Institute, March
  2038.                   1992
  2039.       
  2040.       [1310]      RFC 1310; Lyman Chapin; The Internet Standards
  2041.                   Process; BBN Communications Corporation, March 1992
  2042.       
  2043.       [1327]      RFC 1327 / RARE RTR 2; Steve Kille; Mapping between
  2044.                   X.400(1988) / ISO 10021 and RFC 822; University
  2045.                   College London, May 1992
  2046.       
  2047.       [1328]      RFC 1328 / RARE RTR 3; Steve Kille; X.400 1988 to
  2048.                   1984 downgrading; University College London, May 1992
  2049.       
  2050.       [BP-88]     Bernhard Plattner, Hannes Lubich; Electronic Mail
  2051.                   Systems and Protocols Overview and Case Study;
  2052.                   Proceedings of the IFIP WG 6.5 International working
  2053.                   conference on message handling systems and
  2054.                   distributed applications; Costa Mesa 1988; North-
  2055.                   Holland, 1989
  2056.       
  2057.       [JH-93]     Jeroen Houttuin; @route:100%name@address, a practical
  2058.                   guide to MHS configuration; Top-Level EC 1993 (not
  2059.                   yet published)
  2060.  
  2061.  
  2062. Houttuin               Expires February 1994                [page  36]
  2063.  
  2064. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  2065.  
  2066.  
  2067.       
  2068.       [HTA-faq]   Harald Tveit Alvestrand; Frequently asked questions
  2069.                   on X.400. Regularly posted on USEnet in newsgroup
  2070.                   comp.protocols.iso.x400
  2071.       
  2072.       [Mapau-93]  Jeroen Houttuin, Klaus Hansen, Serge Aumont; RFC 1327
  2073.                   address mapping authorities. RARE WG-MSG working
  2074.                   draft: Internet-Draft 'draft-houttuin-mapauth-
  2075.                   01.txt', May 1993.
  2076.       g
  2077.                   guides . See chapter 3.4.
  2078.       
  2079.       [RG-87]     Rudiger Grimm, Steinar Haug; A minimum Profile for
  2080.                   RFC 987; GMD, November 1987; RARE MHS Project Team;
  2081.                   July 1990. Also available from
  2082.                   nic.switch.ch:/procedures/min-rfc987-profile . See
  2083.                   chapter 3.4.
  2084.       
  2085.       [X.4xx(84)] CCITT Recommendations X.400 - X.430. Data
  2086.                   Communication Networks: Message Handling Systems.
  2087.                   CCITT Red Book, Vol. VIII - Fasc. VIII.7, Malaga-
  2088.                   Torremolinos 1984
  2089.       
  2090.       [X.4xx(88)] CCITT Recommendations X.400 - X.420. Data
  2091.                   Communication Networks: Message Handling Systems.
  2092.                   CCITT Blue Book, Vol. VIII - Fasc. VIII.7, Melbourne
  2093.                   1988
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121. Houttuin               Expires February 1994                [page  37]
  2122.  
  2123. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  2124.  
  2125.  
  2126. Appendix B. Abbreviations
  2127.  
  2128.       ADMD     Administration Management Domain
  2129.       ASCII    American Standard Code for Information Exchange
  2130.       ASN.1    Abstract Syntax Notation One
  2131.       BCD      Binary-Coded Decimal
  2132.       BITNET   Because It's Time NETwork
  2133.       CCITT    Comite Consultatif International de Telegraphique et
  2134.                Telephonique
  2135.       COSINE   Co-operation for OSI networking in Europe
  2136.       DARPA    Defense Advanced Research Projects Agency
  2137.       DFN      Deutsches Forschungsnetz
  2138.       DL       Distribution List
  2139.       DNS      Domain Name System
  2140.       DoD      Department of Defense
  2141.       EBCDIC   Extended BCD Interchange Code
  2142.       IAB      Internet Architecture Board
  2143.       IEC      International Electrotechnical Commission
  2144.       IESG     Internet Engineering Steering Group
  2145.       IETF     Internet Engineering Task Force
  2146.       IP       Internet Protocol.
  2147.       IPM      Inter-Personal Message
  2148.       IPMS     Inter-Personal Messaging Service
  2149.       IPN      Inter-Personal Notification
  2150.       ISO      International Organisation for Standardisation
  2151.       ISOC     Internnet Society
  2152.       ISODE    ISO Development Environment
  2153.       JNT      Joint Network Team (UK)
  2154.       JTC      Joint Technical Committee (ISO/IEC)
  2155.       MHS      Message Handling System
  2156.       MOTIS    Message-Oriented Text Interchange Systems
  2157.       MTA      Message Transfer Agent
  2158.       MTL      Message Transfer Layer
  2159.       MTS      Message Transfer System
  2160.       MX       Mail eXchanger
  2161.       OSI      Open Systems Interconnection
  2162.       OU(s)    Organizational Unit(s)
  2163.       PP       Mail gatewaying software (not an abbreviation)
  2164.       PRMD     Private Management Domain
  2165.       RARE     Reseaux Associes pour la Recherche Europeenne
  2166.       RFC      Request for comments
  2167.       RTC      RARE Technical Committee
  2168.       RTR      RARE Technical Report
  2169.       SMTP     simple mail transfer protocol
  2170.       STD      Standard RFC
  2171.       TCP      Transmission Control Protocol
  2172.       UUCP     Unix to Unix CoPy
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180. Houttuin               Expires February 1994                [page  38]
  2181.  
  2182. Internet-Draft   X.400-Internet mail gatewaying tutorial   August 1993
  2183.  
  2184.  
  2185. Appendix C. Author's address
  2186.  
  2187.     
  2188.     Jeroen Houttuin
  2189.     RARE Secretariat
  2190.     Singel 466-468
  2191.     NL-1017 AW Amsterdam, Europe
  2192.     
  2193.     Tel. +31 20 6391131
  2194.     Fax. +31 20 6393289
  2195.     RFC 822: houttuin@rare.nl
  2196.     X.400:   C=nl;ADMD=400net;PRMD=surf;O=rare;S=houttuin
  2197.  
  2198.  
  2199.  
  2200.  
  2201.  
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239. Houttuin               Expires February 1994                [page  17]
  2240.